package com.primus.server.entity.store;

import com.primus.server.entity.BaseEntity;
import com.primus.server.entity.user.User;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.ManyToOne;
import java.util.Date;

@Entity
@Getter
@Setter
public class Coupon extends BaseEntity {

    private String name;

    private Date deadline;

    private String type;

    private Double fullAmount;

    private Double reduction;

    private boolean invalid;

    @ManyToOne(fetch = FetchType.LAZY)
    private User user;
}
